package com.xiaoyun.service;

import com.xiaoyun.pojo.Items;
import com.xiaoyun.pojo.ItemsImg;
import com.xiaoyun.pojo.ItemsParam;
import com.xiaoyun.pojo.ItemsSpec;
import com.xiaoyun.utils.PagedGridResult;
import com.xiaoyun.vo.CommentLevelCountsVO;
import com.xiaoyun.vo.ItemCommentVO;
import com.xiaoyun.vo.ShopcartVO;
import org.apache.commons.lang3.StringUtils;

import java.util.List;

public interface ItemService {
    Items queryItemById(String itemId);

    List<ItemsImg> queryItemImgList(String itemId);

    List<ItemsSpec> queryItemSpecList(String itemId);

    ItemsParam queryItemParam(String itemId);

    CommentLevelCountsVO queryCommentCounts(String itemId);

    PagedGridResult queryPagedComments(String itemId, Integer level, Integer page, Integer pageSize);

    PagedGridResult searchItems(String keywords, String sort, Integer page, Integer pageSize);

    PagedGridResult searchItems(Integer catId, String sort, Integer page, Integer pageSize);

    List<ShopcartVO> queryItemsBySpecIds(String specIds);

    ItemsSpec queryItemSpecById(String specId);

    String queryItemMainImgById(String itemId);

    void decreaseItemSpecStock(String itemSpecId, int buyCounts);
}
